tensorflow graph
Text
TensorFlow provides you with a rich collection of ops and libraries to help you work with input in text form such as raw text strings or documents. These libraries can perform the preprocessing regularly required by text-based models, and includes other features useful for sequence modeling. You can extract powerful syntactic and semantic text features from inside the TensorFlow graph as input to your neural net. In addition to the above, you do not need to worry about tokenization in training being different than the tokenization at inference, or managing preprocessing scripts.
TensorFI: A Flexible Fault Injection Framework for TensorFlow Applications
Chen, Zitao, Narayanan, Niranjhana, Fang, Bo, Li, Guanpeng, Pattabiraman, Karthik, DeBardeleben, Nathan
As machine learning (ML) has seen increasing adoption in safety-critical domains (e.g., autonomous vehicles), the reliability of ML systems has also grown in importance. While prior studies have proposed techniques to enable efficient error-resilience techniques (e.g., selective instruction duplication), a fundamental requirement for realizing these techniques is a detailed understanding of the application's resilience. In this work, we present TensorFI, a high-level fault injection (FI) framework for TensorFlow-based applications. TensorFI is able to inject both hardware and software faults in general TensorFlow programs. TensorFI is a configurable FI tool that is flexible, easy to use, and portable. It can be integrated into existing TensorFlow programs to assess their resilience for different fault types (e.g., faults in particular operators). We use TensorFI to evaluate the resilience of 12 ML programs, including DNNs used in the autonomous vehicle domain. Our tool is publicly available at https://github.com/DependableSystemsLab/TensorFI.
r/MachineLearning - [D] Tensorflow graphs, custom estimators.. what?
Just for some background, I have been using tensorflow but with the Keras API. But now my job role requires a project where a custom Estimator is needed to be made for a weight based multi class multi label classifier using the dataset API of tensorflow. These are all new topics and although tensorflow docs have information about each topic, I am extremely confused as to what flow to make and which modules to use. It would be of great help if someone could point me towards some material to understand these topics and give some advice towards making a classifier of above mentioned kind. Also a side question: which loss error should I use and how do I incorporate the weights? EDIT: The weights associated with each label (from the multi label dataset) is actually the conversion rate from search page, i.e. (#of orders / # of appearances on the search page)
GAP: Generalizable Approximate Graph Partitioning Framework
Nazi, Azade, Hang, Will, Goldie, Anna, Ravi, Sujith, Mirhoseini, Azalia
Graph partitioning is the problem of dividing the nodes of a graph into balanced partitions while minimizing the edge cut across the partitions. Due to its combinatorial nature, many approximate solutions have been developed, including variants of multi-level methods and spectral clustering. We propose GAP, a Generalizable Approximate Partitioning framework that takes a deep learning approach to graph partitioning. We define a differentiable loss function that represents the partitioning objective and use backpropagation to optimize the network parameters. Unlike baselines that redo the optimization per graph, GAP is capable of generalization, allowing us to train models that produce performant partitions at inference time, even on unseen graphs. Furthermore, because we learn the representation of the graph while jointly optimizing for the partitioning loss function, GAP can be easily tuned for a variety of graph structures. We evaluate the performance of GAP on graphs of varying sizes and structures, including graphs of widely used machine learning models (e.g., ResNet, VGG, and Inception-V3), scale-free graphs, and random graphs. We show that GAP achieves competitive partitions while being up to 100 times faster than the baseline and generalizes to unseen graphs.
Pushing the limits of GPU performance with XLA – TensorFlow – Medium
XLA is a compiler for TensorFlow graphs that you can use to accelerate your TensorFlow ML models today with minimal source code changes. This post describes what XLA is and shows how you can try it out on your own code. TensorFlow 1.12 (with XLA) achieves significant performance gains over TF 1.11 (without XLA) on ResNet50 v1.0 training on NVIDIA Tesla V100 GPUs: 10,526 images/sec with synthetic data and 10,267 images/sec with real data (see appendix for reproduction instructions). We have observed speedups ranging from 1.13x to 3.04x on a variety of internal models. Normally when you run a TensorFlow graph, all of the operations are executed individually by the TensorFlow graph executor.
AutoGraph: Imperative-style Coding with Graph-based Performance
Moldovan, Dan, Decker, James M, Wang, Fei, Johnson, Andrew A, Lee, Brian K, Nado, Zachary, Sculley, D, Rompf, Tiark, Wiltschko, Alexander B
There is a perceived trade-off between machine learning code that is easy to write, and machine learning code that is scalable or fast to execute. In machine learning, imperative style libraries like Autograd and PyTorch are easy to write, but suffer from high interpretive overhead and are not easily deployable in production or mobile settings. Graph-based libraries like TensorFlow and Theano benefit from whole-program optimization and can be deployed broadly, but make expressing complex models more cumbersome. We describe how the use of staged programming in Python, via source code transformation, offers a midpoint between these two library design patterns, capturing the benefits of both. A key insight is to delay all type-dependent decisions until runtime, via dynamic dispatch. We instantiate these principles in AutoGraph, a software system that improves the programming experience of the TensorFlow library, and demonstrate usability improvements with no loss in performance compared to native TensorFlow graphs. We also show that our system is backend agnostic, and demonstrate targeting an alternate IR with characteristics not found in TensorFlow graphs.
TensorRT Integration Speeds Up TensorFlow Inference NVIDIA Developer Blog
NVIDIA announced the integration of our TensorRT inference optimization tool with TensorFlow. TensorRT integration will be available for use in the TensorFlow 1.7 branch. TensorFlow remains the most popular deep learning framework today while NVIDIA TensorRT speeds up deep learning inference through optimizations and high-performance runtimes for GPU-based platforms. We wish to give TensorFlow users the highest inference performance possible along with a near transparent workflow using TensorRT. The new integration provides a simple API which applies powerful FP16 and INT8 optimizations using TensorRT from within TensorFlow.
lifeomic/sparkflow
This is an implementation of Tensorflow on Spark. The goal of this library is to provide a simple, understandable interface in using Tensorflow on Spark. With SparkFlow, you can easily integrate your deep learning model with a ML Spark Pipeline. Underneath, SparkFlow uses a parameter server to train the Tensorflow network in a distributed manor. Through the api, the user can specify the style of training, whether that is Hogwild or async with locking.
Loading TensorFlow graphs from Node.js – Jim Fleming – Medium
Check out the related post: Loading a TensorFlow graph with the C API. Even though the full C API for TensorFlow is not yet available, we can still use it load TensorFlow graphs and evaluate them from other languages. This is incredibly useful for embedding pre-trained models in other applications. Embedding is one of the most interesting use cases for TensorFlow as it cannot be accomplished as easily with Theano. Note that while all of the examples here will use Node.js the steps are nearly identical in any language with C FFI support (e.g.
Introducing TensorFlow Hub: A Library for Reusable Machine Learning Modules in TensorFlow
One of the things that's so fundamental in software development that it's easy to overlook is the idea of a repository of shared code. As programmers, libraries immediately make us more effective. In a sense, they change the problem solving process of programming. When using a library, we often think of programming in terms of building blocks -- or modules -- that can be tied together. How might a library look for a machine learning developer?